package com.zzy.system.domain;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzy.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 订单实体类，用于表示订单的各种属性信息。
 */
@Data
public class SaleOrderTraceSpus extends BaseEntity {
    //主键 自增
    @TableId(type = IdType.AUTO)
    private Integer SaleOrderTraceSpusId;
    private static final long serialVersionUID = 1L;

    /**
     * 明细id
     */
    @JSONField(name = "id")
    private int id;

    /**
     * 商品spuId
     */
    @JSONField(name = "spu_id")
    private String spuId;

    /**
     * 检测报告id
     */
    @JSONField(name = "report_id")
    private int reportId;

    /**
     * 检测时间
     */
    @JSONField(name = "detect_date")
    private String detectDate;

    /**
     * 检测时间
     */
    @JSONField(name = "is_deleted")
    private String isDeleted;
    /**
     * 商品名
     */
    @JSONField(name = "name")
    private String name;


    /**
     * 一级分类名称
     */
    @JSONField(name = "category1_name")
    private String category1Name;


    /**
     * 二级分类名称
     */
    @JSONField(name = "category2_name")
    private String category2Name;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "create_time")
    private Date guanmaiTraceSpusCreateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "modify_time")
    private Date guanmaiTraceSpusModifyTime;
    //批次
    @JSONField(name = "batches")
    @TableField(exist = false)
    private List<SaleOrderTraceSpusBatches> batches;
}